From 6cb399e7267ae78e3e498bdbf5f51678ffb2cd45 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 21 Feb 2023 23:24:14 +0100
Subject: feat: Many things

Configure sanity in same project as the app
Implement type safe sanity schema
Read localised documents
Strip down design
---
 src/routes/[lang=lang]/sections/products.svelte | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'src/routes/[lang=lang]/sections/products.svelte')

diff --git a/src/routes/[lang=lang]/sections/products.svelte b/src/routes/[lang=lang]/sections/products.svelte
index 816e276..a2999dc 100644
--- a/src/routes/[lang=lang]/sections/products.svelte
+++ b/src/routes/[lang=lang]/sections/products.svelte
@@ -1,4 +1,5 @@
 <script context="module" lang="ts">
+	import type { SanityBlockArray } from "$lib/sanity/types/block-array";
 	export type ProductsModel = {
 		products: ProductModel[];
 	};
@@ -7,13 +8,14 @@
 		title: string;
 		duration: string;
 		cost: string;
-		description: string;
+		description: SanityBlockArray;
 		orderLink: string;
 	};
 </script>
 
 <script lang="ts">
 	import CardV4 from "$components/card-v4.svelte";
+	import LL from "$i18n/i18n-svelte";
 
 	export let model: ProductsModel;
 
@@ -28,14 +30,19 @@
 {#if visible}
 	<div class="wrapper">
 		{#each model.products as product}
-			<CardV4 description={product.description} title={product.title} />
+			<CardV4 description={product.description} title={product.title}>
+				<div class="flex flex-wrap justify-end align-bottom">
+					<a href={product.orderLink} class="btn btn--primary">{$LL.goToBookingPage()}</a>
+				</div>
+			</CardV4>
 		{/each}
 	</div>
 {/if}
 
 <style lang="postcss">
 	.wrapper {
-		display: grid;
-		grid-template-columns: repeat(50%);
+		display: flex;
+		flex-direction: row;
+		gap: 1em
 	}
 </style>
-- 
cgit v1.3

